package com.alog.senior.day15;

import java.util.HashMap;
import java.util.Scanner;

/**
 * @Auther: Ye Zhengdong
 * @Date: 2019/1/22 11:28
 * @Description:
 */
public class Test {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        HashMap<Character, Integer> map = new HashMap<>();
        System.out.println("请输入:");
        String input = sc.next();
        for(Character ch : input.toCharArray()){
            if(map.containsKey(ch)){
                map.put(ch, map.get(ch) + 1);
            } else {
                map.put(ch, 1);
            }
        }

        System.out.println(map);

    }
}
